<!DOCTYPE html>
<html>

<head>
    <meta charset=utf-8>
    <meta name=viewport content="width=device-width,initial-scale=1,user-scalable=0">
    <title>时间清单</title>
    <link rel=stylesheet href=static/z39h5/css/mp3player.css>
    <link rel=stylesheet href=static/z39h5/css/fonts/iconfont.css>
    <link rel=stylesheet href=static/csslib/csshake.min.css>
    <link rel=stylesheet href=static/csslib/prismplayer/index-min.css>
    <script src=static/jslib/prism-h5-min.js></script>
    <link rel=stylesheet type=text/css href=static/z39h5/css/moviePage.css>
    <link href=static/z39h5/css/app.636e3ae3d4009aca0ceccf6feeaea33d.css rel=stylesheet>
</head>

<body>
    <script src=static/jslib/smap-shim.min.js></script>
    <script src=static/jslib/pinyin.js></script>
    <script src=static/jslib/mui.js></script>
    <script src=static/jslib/mui.init.js></script>
    <script src=static/jslib/mui.namespace.js></script>
    <script src=static/jslib/mui.detect.5.js></script>
    <script src=static/jslib/mui.dialog.toast.js></script>
    <script src=static/jslib/mui.back.js></script>
    <script src=static/jslib/mui.init.5.js></script>
    <script src=static/jslib/mui.back.5.js></script>
    <script src=static/jslib/mui.fixed.js></script>
    <script>
    var firstLogin = 0; // {{firstLogin}} ;
    var isApp = false; // mui.plusReady 会修改赋值.
    var isPc = false; //在mixin.js中的 showNotice 使用.
    var userInfo, baseInfo, token;
    try {
        baseInfo = JSON.parse('{{ baseInfo | safe }}');
        token = baseInfo.token || "";
    } catch (e) {}
    try {
        userInfo = JSON.parse('{{ userInfo | safe }}');
        token = token || userInfo.token || "";
    } catch (e) {}
    if (token) localStorage.setItem("token", token)
    // 小程序分享和微信分享.
    function doAllShare(share) {
        if (window.__wxjs_environment === 'miniprogram') {
            var pd = { type: "share" };
            var uid = userInfo ? userInfo.uid : 0;
            if (share.pathH5) share.pathH5 = share.pathH5 + "&share=" + uid;
            pd = Object.assign(pd, share);
            wx.miniProgram.postMessage({ data: JSON.stringify(pd) })
            // console.log("shareData:", pd, share);
        }
        try {
            shareData.title = share.title;
            shareData.content = share.content || shareData.content;
            if (userInfo) {
                shareData.link = share.pathH5 + (share.pathH5.indexOf("?") != -1 ? "&share=" : "?share=") + userInfo.uid;
            } else {
                shareData.link = share.pathH5;
            }
            doWxShare();
        } catch (e) {}
    }
    </script>
    <div id=app-box></div>
    <script src=static/jslib/pinyin.js></script>
    <script src=static/jslib/jquery.js></script>
    <script src=static/jslib/underscore-min.js></script>
    <script src=//res.wx.qq.com/open/js/jweixin-1.3.2.js></script>
    <script src=static/jslib/share.js></script>
    <script src=static/jslib/moment.min.js></script>
    <script src=static/z39h5/js/parseTlog.js></script>
    <script src=static/jslib/polyfill.js></script>
    <script src=static/jslib/moveListen.js></script>
    <script src=static/jslib/dcloud_audio.js></script>
    <script src=static/jslib/dcloud_auth.js></script>
    <script src=static/jslib/dcloud_push.js></script>
    <script src=static/jslib/dcloud_phones.js></script>
    <script type=text/javascript>
    mui.init()
//              localStorage.setItem("showTech",'');   //首页视频弹窗,测试使用
//              localStorage.setItem("showTechDay",'');   //首页视频弹窗,测试使用
//	var test1 = plus.runtime.isApplicationExist({pname:'com.autonavi.minimap',action:'iosamap://'});
//	var test2 = plus.runtime.isApplicationExist({pname:'com.baidu.BaiduMap',action:'baidumap://'});
//	console.log("install test:",test1,test2);

    var clientid, deviceToken, appType;
    mui.plusReady(function() {
        plus.webview.currentWebview().setStyle({ statusbar: { background: '#f0f0f0' }, top: 0, bottom: 0 });

        isApp = true; //如果dcloud h5+成功运行.那就是APP中.
        initApp();
        runWatch(); //修改到需要的时候在调用. 方便APP审核上线临时注释--------------------------
        initAuth();
//      console.log("Push.pushListener",Push.pushListener,Push);
        pushListener(); //Push.pushListener();
        
        //getAppPhone(); //获取通讯录

        //      initDcloudAudio(); //获取录音 dcloud_audio.js   //修改到需要的时候在调用.
        clientid = plus.push.getClientInfo().clientid;
        deviceToken = plus.push.getClientInfo().token;
        appType = plus.os.name == "Android" ? 1 : 2; //Android iOS

        // 监听摇一摇  ,方便APP审核上线临时注释--------------------------
        plus.accelerometer.watchAcceleration(shake, function(e) {
            //outSet('Watch failed: '+e.message);
        }, { frequency: 100 });
        var view = plus.webview.currentWebview();
        var first = null;
        plus.key.addEventListener("backbutton", function() { //安卓手机点击系统返回按钮，控制单页面应用返回
            view.canBack(function(e) {
                if (e.canBack) {
                    view.back(); //history.back();
                } else {
                    //首次按键，提示‘再按一次退出应用’
                    if (!first) {
                        first = new Date().getTime();
                        mui.toast('再按一次退出应用');
                        setTimeout(function() {
                            first = null;
                        }, 1000);
                    } else {
                        if (new Date().getTime() - first < 1000) {
                            plus.runtime.quit();
                        }
                    }
                }
                //              mui.toast('back:'+e.canBack+first+(new Date().getTime() - first < 1000));
            });
        });
        //      mui.back = function() {         
        //      };
    })
    </script>
    <script type=text/javascript src=static/z39h5/js/manifest.4415d72410d21cd5b880.js></script>
    <script type=text/javascript src=static/z39h5/js/vendor.760c981a52d9f765075b.js></script>
    <script type=text/javascript src=static/z39h5/js/app.e9910efdbc67993990ee.js></script>
</body>

</html>